package com.zxc.ompz;

public class Timer {
	private long time;
	public Timer(long time){
		this.time = time;
	}
	public String toString(){
		int seconds = (int)(time/1000000);
		int h = seconds/3600;
		int m = seconds/60%60;
		int s = seconds%60;

		String hh = String.valueOf(h);
		String mm = String.valueOf(m);
		String ss = String.valueOf(s);

		if (s < 10) { ss = "0" + ss; }
		if (m < 10) { mm = "0" + mm; }

		if (h > 0 )	{
			return hh + ":" + mm + ":" + ss;
		}
		else {
			return mm + ":" + ss;
		}
	}
}
